package main.com.dhj.test01

object test04 {
    def main(args: Array[String]): Unit = {
        def methodExample(x: Int): Int = {
            println("In method")
            x + 1
        }

        val functionExample = (x: Int) => {
            println("In function")
            x + 1
        }

        val num =4;
        println(methodExample(num));
        println(functionExample(num));
        
    }

}
